package cqupt.spark_log.main;

import cqupt.spark_log.contrant.Contant;
/**
 * 生成jar包的程序入口
 * @author TomWang
 *
 */
public class JarMain {

	public static void main(String[] args) {
		// 判断args参数是否够
		if (args.length != 8) {
			System.out.println(
					"参数错误,8个参数,列表如下：APP_NAME,BASE_PATH,HOST_1_ENERGY,HOST_2_ENERGY,HOST_3_ENERGY,HOST_4_ENERGY,HOST_5_ENERGY,HOST_6_ENERGY");
			System.exit(0);
		} else {
			Contant.APP_NAME = args[0];
			Contant.BASE_PATH = args[1] + Contant.APP_NAME;
			Contant.HOST_1_ENERGY = Double.parseDouble(args[2]);
			Contant.HOST_2_ENERGY = Double.parseDouble(args[3]);
			Contant.HOST_3_ENERGY = Double.parseDouble(args[4]);
			Contant.HOST_4_ENERGY = Double.parseDouble(args[5]);
			Contant.HOST_5_ENERGY = Double.parseDouble(args[6]);
			Contant.HOST_6_ENERGY = Double.parseDouble(args[7]);
		}
		Main.main(args);
	}
}
